<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>文章添加--layui后台管理模板</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
<script type="text/javascript" charset="utf-8" src="../../uedit1_4_3/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../../uedit1_4_3/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="../../uedit1_4_3/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/jquery.min.js"></script>

<style type="text/css">
.layui-form-select dl{
z-index:9999;
}
</style>
</head>
<body class="childrenBody">
	<form class="layui-form" method="post" action="adminnews_add" target="_parent" enctype="multipart/form-data">
		<div class="layui-form-item">
			<label class="layui-form-label">文章标题</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input newsName"
					lay-verify="required" placeholder="请输入文章标题" name="news_title">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">文章作者</label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input newsAuthor"
						 placeholder="请输入文章作者" name="news_author">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">发布时间</label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input newsTime"
						 onclick="layui.laydate({elem:this})" name="news_time">
				</div>
				<div class="layui-inline">
				<label class="layui-form-label">是否展示</label>
				<div class="layui-input-block">
					<input type="checkbox" name="news_isshow" class="isShow" title="展示" value="1">
				</div>
			</div>
			</div>
		<div class="layui-form-item">
			<label class="layui-form-label">文章类别</label>
			<div class="layui-input-inline">
				<select name="category.cate_id" id="categoryId" class="layui-input newsCategory">
					<option value="3">协会动态</option>
					<option value="4">法律法规</option>
					<option value="6">文件下载</option>
					<option value="9">通知公告</option>
					<option value="10">信用信息</option>
					<option value="11">信用资料</option>
					<option value="12">会员风采</option>
					<option value="13">手机资料</option>
				</select>
			</div>
			<!-- <label class="layui-form-label">浏览权限</label>
				<div class="layui-input-inline">
					<select name="news_perm" class="newsLook" lay-filter="browseLook" >
						<option value="0">开放浏览</option>
						<option value="1">会员浏览</option>
					</select>
				</div> -->
			<div class="layui-inline">
				<label class="layui-form-label">图片上传</label>
				<div class="layui-input-inline">
					<input type="file" name="upload">
				</div>
			</div>
		<div class="layui-form-item">
			<label class="layui-form-label">内容摘要</label>
			<div class="layui-input-block">
				<textarea placeholder="请输入内容摘要" class="layui-textarea" name="news_summary"></textarea>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">文章内容</label>
			<div class="layui-input-block">
				<script id="editor" type="text/plain" style="width: 100%; height: 500px;" ></script>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" lay-filter="addNews">立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
	<script type="text/javascript">
    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor');
/*     $(function(){
    	var url = "/xjeca/adminCategory_findCategoryAll";
    	$.post(url,function(data){
    		$(data).each(function(i,n){
    			$("#categoryId").append("<option value="+n.cate_id+">"+n.cate_name+"</option>");
    		});
    	});
    }); */
	</script>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript" src="newsAdd.js"></script>
</body>
</html>